﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LiuYan.Interface
{
    public class WxEntity
    {
        public static string token = "";//微信token
        public static string appid = "";//微信appid
        public static string mch_id = "";//商户号
        public static string secret = "";//微信secretid
        public static string key = "";//商户key
        public static string UnifiedPayUrl = "https://api.mch.weixin.qq.com/pay/unifiedorder"; //统一支付接口
        // accesstoken 获取地址
        public static string getAccessTokenUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}";
        //menu  菜单获取地址
        public static string getMenuUrl = "https://api.weixin.qq.com/cgi-bin/menu/get?access_token={0}";
        //menu 菜单创建地址
        public static string creatMenuUrl = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token={0}";
        //删除微信菜单
        public static string delMenuUrl = "https://api.weixin.qq.com/cgi-bin/menu/delete?access_token={0}";
        // 第一步 oauth2.0鉴权地址 并返回code
        public static string OauthUrl = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={0}&redirect_uri={1}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
        //第二不 通过 第一步返回的code获取openid和accss_token
        public static string GetOpenIdUrl = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={0}&secret={1}&code={2}&grant_type=authorization_code";
        //第三步 获取用户信息
        public static string GetWxUserUrl = "https://api.weixin.qq.com/sns/userinfo?access_token={0}&openid={1}&lang=zh_CN";
   //订单通知
        public static string notifyUrl = "http://www.mtc.lzfbk.com/Message/Index";
        //订单取消
        public static string closeOrderUrl = "https://api.mch.weixin.qq.com/pay/closeorder";
    }
}
